table.insert(itemActions,
	function(item, action)
		-- MAGIC shields
		-- see: dir .. "readme.txt" for information regarding these variables
		local priority = 7
		local identify = true
		local dump = true

		if not (item.quality == ItemQuality.Magic and (item.baseItem.code == "uit" or 
        item.baseItem.code == "xit" or item.baseItem.code == "urg" or item.baseItem.code == "ush" or 
        item.baseItem.code == "upk" or item.baseItem.baseType.Type == ItemKind.AuricShields)) then
			return false
		elseif action == aPICK and (not item.flags.Identified or
				isGoodMagicMonarch(item) or isGoodMagicAuricShield(item)) then
			return priority
		elseif action == aIDENT then
			return identify
		elseif action == aSELL and item.flags.Identified and not (
				isGoodMagicMonarch(item) or isGoodMagicAuricShield(item)) then
			return true
		elseif action == aDUMP and item.flags.Identified and not (
				isGoodMagicMonarch(item) or isGoodMagicAuricShield(item)) then
			return dump
		end

		return false
	end
)


function isGoodMagicMonarch(item)
	if item.baseItem.code ~= ("uit" or "xit"  or "urg" or "ush" or "upk") then
		return false
	end
	
	if hasCertainSockets(item, "34") then
	   return true
	end
	
	   --	if findStat(item, "Sockets") >= 3 then
	   --		return true
	   --	end

end

function isGoodMagicAuricShield(item)
	if item.baseItem.baseType.Type ~= ItemKind.AuricShields then
		return false
	end
	
	if hasCertainSockets(item, "34") and hasRes(item, 10, 4) then
	   return true
	end
end